﻿using DataLayer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataLayer.Repositories
{
    public class IndoorExercisePersonalRepository : Repository<IndoorExercisePersonal>
    {
        public IndoorExercisePersonalRepository(GameUPContext context) : base(context) { }

        public IEnumerable<IndoorExercisePersonal> GetActivateIndoorExerciseByPlayer(int IdPlayer)
        {
            return GetAll().Where(indoor => indoor.IdPlayer.Id == IdPlayer && indoor.ActivationDate <= DateTime.Now);
        }

    }
}
